package com.guaoran.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import springfox.documentation.annotations.ApiIgnore;

/**
 * @author : guaoran
 * @Description : <br/>
 *  Swagger首页
 * @date :2018/11/15 14:15
 */
@Api("Swagger首页")
@Controller
public class SwaggerController {
    @ApiOperation(value="欢迎界面", notes="进入到swagger界面")
    @GetMapping("/swagger")
    public String swagger(){
        return "redirect:/swagger-ui.html";
    }
    @ApiIgnore//使用该注解忽略这个API
    @GetMapping("/demo")
    @ResponseBody
    public String demo(){
        return "success";
    }
}
